﻿@inject AppState AppState

<StackLayout>
    <Label FontSize="30" FontAttributes="FontAttributes.Italic" Text="@("You have pressed " + AppState.Counter + " times")" />
    <Button OnClick="HandleClick">
        +1
    </Button>
</StackLayout>

@code {
    void HandleClick()
    {
        AppState.Counter++;
    }
}
